package com.manager.model;

import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

@Entity
@Table(name="tb_scheduling_strategy_docker_container")
public class SchedulingStrategyDockerContainer extends AllId{

    private SchedulingStrategy schedulingStrategy;

    private DockerDeploy dockerDeploy;

    private Integer containerSort;

    @ManyToOne(fetch = FetchType.LAZY)
    @Cascade(CascadeType.PERSIST)
    public SchedulingStrategy getSchedulingStrategy() {
        return schedulingStrategy;
    }

    public void setSchedulingStrategy(SchedulingStrategy schedulingStrategy) {
        this.schedulingStrategy = schedulingStrategy;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @Cascade(CascadeType.PERSIST)
    public DockerDeploy getDockerDeploy() {
        return dockerDeploy;
    }

    public void setDockerDeploy(DockerDeploy dockerDeploy) {
        this.dockerDeploy = dockerDeploy;
    }

    public Integer getContainerSort() {
        return containerSort;
    }

    public void setContainerSort(Integer containerSort) {
        this.containerSort = containerSort;
    }
}
